/*
Copyright (c) [2019年5月1日] [吴超]
[MBT_studio] is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
		 http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details.
*/
#pragma once

#include <vulkan/vulkan.h>
#include <array> 

#include "core/设备内存缓存.h"
#include "../../绘图框架.h"

/*typedef struct {
	VkPipelineVertexInputStateCreateInfo	m_顶点输入创建信息;
	VkPipelineInputAssemblyStateCreateInfo	m_输入装配状态;
}S_Vk顶点输入信息;


struct S_Vk顶点输入 {

	static VkVertexInputBindingDescription f_取顶点输入配置绑定(uint16 绑定位置) {
		VkVertexInputBindingDescription 顶点绑定配置 = {};
		顶点绑定配置.binding = 0;
		顶点绑定配置.stride = sizeof(vec3) * 2 + sizeof(vec2) * 2;
		顶点绑定配置.inputRate = VK_VERTEX_INPUT_RATE_VERTEX;

		return 顶点绑定配置;
	}

	static std::array<VkVertexInputAttributeDescription, 8> f_取顶点配置属性(uint16 绑定位置) {
		std::array<VkVertexInputAttributeDescription, 8> 属性配置 = {};

		//顶点
		属性配置[0].binding = 绑定位置;
		属性配置[0].location = 0;
		属性配置[0].format = VK_FORMAT_R32G32B32_SFLOAT;

		//法线
		属性配置[1].binding = 绑定位置;
		属性配置[1].location = 1;
		属性配置[1].format = VK_FORMAT_R32G32B32_SFLOAT;

		//颜色
		属性配置[2].binding = 绑定位置;
		属性配置[2].location = 2;
		属性配置[2].format = VK_FORMAT_R8G8B8A8_UINT;

		//UV
		属性配置[3].binding = 绑定位置;
		属性配置[3].location = 3;
		属性配置[3].format = VK_FORMAT_R32G32_SFLOAT;


		return 属性配置;
	}




	void	f_填充顶点(const std::vector<vec3>& v, void* ctx = 0) {}
	void	f_填充法线(const std::vector<vec3>& n, void* ctx = 0) {}
	void	f_填充颜色(const std::vector<ubvec4>& c, void* ctx = 0) {}
	void	f_填充索引(const std::vector<uint32>& index, void* ctx = 0) {}

	void	f_填充UV1(const std::vector<vec2>& uv1, void* ctx = 0) {}
	void	f_填充UV2(const std::vector<vec2>& uv2, void* ctx = 0) {}


	void	f_resize(uint32 size);



	E_vec3元素指针	f_getData();
	void			f_fillData(std::vector<vec3>& data);





	void			f_UpMap顶点();
	void			f_UpMap法线();
	void			f_UpMap颜色();
	void			f_UpMap索引();

	void			f_UpMapUV1();
	void			f_UpMapUV2();




	void*	f_map();
	void	f_unmap();

};


S_Vk顶点输入信息 f_顶点输入();*/



